/*
 * @Author: 计都 3038199036@qq.com
 * @Date: 2024-09-19 09:35:32
 * @LastEditors: 计都 3038199036@qq.com
 * @LastEditTime: 2024-09-19 21:00:09
 * @FilePath: \vuePDF\src\router\index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { createRouter, createWebHistory } from 'vue-router'

const routes = [
    {
        path: '/',
        name: 'home',
        component: () => import('../layout/Layout.vue'),
        meta: { title: '首页' },
        redirect: "/home",
        children: [
            {
                path: '/home',
                name: '/home',
                component: () => import('../views/home.vue'),
                meta: { title: '详情' },
            },
            {
                path: '/terminal',
                name: '/terminal',
                component: () => import('../views/terminal.vue'),
                meta: { title: 'Terminal' },
            },
        ]
    },
    {
        path: '/web',
        name: '/WebNotes',
        component: () => import('../layout/Layout.vue'),
        meta: { title: 'Web笔记' },
        redirect: "/a",
        children: [
            {
                path: '/a',
                name: '/test1',
                component: () => import('../views/web/a.vue'),
                meta: { title: '第一个' }
            },
            {
                path: '/b',
                name: '/test2',
                component: () => import('../views/web/b.vue'),
                meta: { title: '第二个' }
            },
        ]
    }
]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router
